package huawei;
import java.util.*;

/**
 * 质数因子
 */
public class PrimeFacter {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        while (sc.hasNext()) {
            long num = sc.nextLong();

            if (num == 1) {
                System.out.println(num + " ");
                continue;
            }

            for (int i = 2; i <= num; ++i) {
                if (num % i == 0) {
                    num = num / i;
                    System.out.print(i + " ");
                    i--;//遇到一个质数，那么该质数可能会被整除多次
                }
            }
        }
    }
}